<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta content="width=device-width, initial-scale=1.0" name="viewport">
    <title>下载与上传文件</title>
</head>

<body>
<a th:href="@{/test/download}">下载文件</a> <br>
<form enctype="multipart/form-data" method="post" th:action="@{/test/upload}">
    头像: <input name="avatar" type="file"> <br>
    <input type="submit" value="提交">
</form>
</body>
</html>